
let typeAll = {
  image: ['png', 'jpg', 'jpeg', 'svg'],
  video: ['avi', 'mpeg', 'mp4', 'wmv', 'flv', 'mov', 'mkv', 'rmvb', '3gp']
}

export default function fileType (url) {
  let type = url.split('.')[url.split('.').length - 1]
  let size = ''
  for (const key in typeAll) {
    typeAll[key].forEach((item) => {
      if (item == type) {
        size = key
      }
    })
  }
  return size
}